<!-- @format -->

<script setup>
	// 导入 MyGoods 商品组件
	import MyGoods from './components/MyGoods.vue'
	// 父组件提供数据
	const goodsObj = {
		id: '3998274',
		name: '德国百年工艺高端水晶玻璃红酒杯2支装',
		price: 139,
		picture:
			'https://yanxuan-item.nosdn.127.net/8896b897b3ec6639bbd1134d66b9715c.jpg'
	}
</script>
<template>
	<div class="list">
		<!-- 使用子组件 -->
		<MyGoods
			:imgUrl="goodsObj.picture"
			:title="goodsObj.name"
			:price="goodsObj.price" />
	</div>
</template>

<style lang="scss">
	* {
		margin: 0;
		padding: 0;
		box-sizing: border-box;
	}

	.list {
		width: 1000px;
		margin: 0 auto;
		display: flex;
		flex-wrap: wrap;
	}
</style>
